function thisrender(this, hFig, pos)
%THISRENDER Render the Target Selector
%   THISRENDER(H, hFIG, POS) Render the Target Selector associated with this to
%   the figure whose handle is hFIG in the position specified by POS.

%   Author(s): J. Schickler
%   Copyright 1988-2004 The MathWorks, Inc.
%   $Revision: 1.5.4.6 $  $Date: 2004/12/26 22:22:20 $

sz   = gui_sizes(this);
if nargin < 3
    pos = [10 10 160 120]*sz.pixf; 
    if nargin < 2
        hFig = gcf;
    end
end

% Render the components
hPanel = uipanel('Parent', hFig, ...
    'Units', 'Pixels', ...
    'Position', pos, ...
    'Title', xlate('Target Selection'), ...
    'Visible', 'Off');

set(this, 'Parent', hFig, 'Container', hPanel);

rendercontrols(this, hPanel);
renderactionbtn(this, pos, xlate('Select target ...'), 'selecttarget');

h = get(this, 'Handles');

set(h.selecttarget, 'Visible', 'On');

hLayout = siglayout.gridbaglayout(hPanel, ...
    'HorizontalGap', 5*sz.pixf, ...
    'VerticalGap', 10*sz.pixf, ...
    'HorizontalWeights', [0 1], ...
    'VerticalWeights',   [0 0 1]);

hLayout.add(h.boardnumber_lbl, 1, 1, ...
    'TopInset', 10*sz.pixf, ...
    'MinimumWidth', largestuiwidth(h.boardnumber_lbl), ...
    'MinimumHeight', sz.uh-sz.lblTweak, ...
    'Anchor', 'SouthWest');

hLayout.add(h.boardnumber, 1, 2, ...
    'TopInset', 10*sz.pixf, ...
    'MinimumHeight', sz.uh, ...
    'Fill', 'Horizontal');

hLayout.add(h.processornumber_lbl, 2, 1, ...
    'MinimumWidth', largestuiwidth(h.processornumber_lbl), ...
    'MinimumHeight', sz.uh-sz.lblTweak, ...
    'Anchor', 'SouthWest');

hLayout.add(h.processornumber, 2, 2, ...
    'MinimumHeight', sz.uh, ...
    'Fill', 'Horizontal');

hLayout.add(h.selecttarget, 3, [1 2], ...
    'MinimumWidth', 0, ...
    'MinimumHeight', sz.uh, ...
    'PreferredWidth', largestuiwidth(h.selecttarget)+20*sz.pixf, ...
    'Anchor', 'South');

set(this, 'Layout', hLayout);

% [EOF]
